<%@ Page Language="C#" MasterPageFile="~/Site.master" %>
<%@ Import Namespace="SoftwareMonkeys.Scriptech.Web" %>
<%@ Import Namespace="SoftwareMonkeys.Scriptech.Scripts" %>
<asp:Content ID="BodyContent" ContentPlaceHolderID="Body" runat="server">
<h1>Scripts</h1>
<p><a href='<%= Request.ApplicationPath %>'>Home</a></p>
	<p>
		Create: <a href='<%= WebUtilities.MapUrlPath("/CreateScript.aspx?Script=untitled.ascx") %>'>ASPX Script</a> | <a href='<%= WebUtilities.MapUrlPath("/CreateScript.aspx?Script=untitled.script") %>'>Scriptlet</a>
	</p>
	<table width="100%">
	<% foreach (string scriptPath in ScriptReader.GetScripts()){ %>
		<tr>
			<td>
				<a href='<%= WebUtilities.MapUrlPath("Scripts/" + ScriptsUtil.GetScriptFileName(scriptPath)) %>'>
				<%= ScriptsUtil.GetScriptName(scriptPath) %>
				</a>
			</td>
			<td>
				<a href='<%= WebUtilities.MapUrlPath("Scripts/" + ScriptsUtil.GetScriptFileName(scriptPath)) %>'>Run</a> - <a href='<%= WebUtilities.MapUrlPath("/EditScript.aspx?Script=" + ScriptsUtil.GetScriptFileName(scriptPath)) %>'>Edit</a> - <a href='<%= WebUtilities.MapUrlPath("/DeleteScript.aspx?Script=" + ScriptsUtil.GetScriptFileName(scriptPath)) %>' id='<%= "Delete_" + ScriptsUtil.GetScriptFileName(scriptPath).Replace(".", "_") + "_Link" %>' onclick='return confirm("Are you sure you want to delete this script?");'>Delete</a>
				 
			</td>
		</tr>
	<% } %>
	</table>

</asp:Content>
